import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import VueLazyload from 'vue-lazyload'
import VueCookies from 'vue-cookies'
import 'lib-flexible/flexible'
import 'vant/lib/index.css'
import '../src/assets/style/style.less'

Vue.use(Vant)
Vue.use(VueLazyload, {
  preLoad: 1.3,
  attempt: 1
})
Vue.use(VueCookies)


router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  window.document.title = to.meta.title == undefined?'珠宝商城':to.meta.title
  next()
 });

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
